<%@ page language="java" contentType="text/html; charset=UTF-8"
         pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>

<head>

    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>图书管理系统- 注册</title>
    <link href="static/css/bootstrap.min.css?v=3.3.7" rel="stylesheet">
    <link href="static/css/font-awesome.css?v=4.4.0" rel="stylesheet">
    <link href="static/css/plugins/iCheck/custom.css" rel="stylesheet">
    <link href="static/css/animate.css" rel="stylesheet">
    <link href="static/css/style.css?v=4.1.0" rel="stylesheet">
    <script>if(window.top !== window.self){ window.top.location = window.location;}</script>
<script>
    function check(){
        if($('#1').val()!=$('#2').val()){
            alert('两次输入的密码不一致，请重新输入')
        }

    }
</script>
</head>

<body class="gray-bg">

<div class="middle-box text-center loginscreen   animated fadeInDown">
    <div>
        <div>

            <h3 class="logo-name">~</h3>

        </div>
        <h3>这里注册完成才能登录哦 </h3>
        <p>创建一个新账户</p>
        <form class="m-t" role="form" method="post" action="RegisterServlet">
            <div class="form-group">
                <input type="text" class="form-control" placeholder="请输入学号/管理员号" name="usernum">
            </div>
            <div class="form-group">
                <input type="text" class="form-control" placeholder="请输入用户名" name="username">
            </div>
            <div class="form-group">
                <input type="password" class="form-control" placeholder="请输入密码" id ="1" name="password">
            </div>
            <div class="form-group">
                <input type="password" class="form-control" placeholder="请再次输入密码" id="2" onchange="check()">
            </div>
            <div class="form-group text-left">
                <input type="radio" value="1" name="status">管理员
                <input type="radio" value="0" name="status">用户
                <div class="checkbox i-checks">
                    <label class="no-padding">
                        <input type="checkbox"><i></i> 我同意注册协议</label>
                </div>
            </div>
            <button type="submit" class="btn btn-primary block full-width m-b">注 册</button>

            <p class="text-muted text-center"><small>已经有账户了？</small><a href="login.jsp">点此登录</a>
            </p>

        </form>
    </div>
</div>

<!-- 全局js -->
<script src="static/js/jquery.min.js?v=2.1.4"></script>
<script src="static/js/bootstrap.min.js?v=3.3.7"></script>
<!-- iCheck -->
<script src="static/js/plugins/iCheck/icheck.min.js"></script>
<script>
    $(document).ready(function () {
        $('.i-checks').iCheck({
            checkboxClass: 'icheckbox_square-green',
            radioClass: 'iradio_square-green',
        });
    });
</script>
</body>

</html>
